package com.wl.config;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

public class DynamicRoutingDataSource extends AbstractRoutingDataSource {
  
    @Override  
    protected Object determineCurrentLookupKey() {  
        // 从上下文获取当前数据源键，例如使用ThreadLocal  
        return DataSourceContextHolder.getDataSourceKey();  
    }  
}